import request from "@/utils/request";
import { download } from "@/utils/request";
// 新增发货单
export function fetchAddInvoice(params) {
  return request({
    url: "/vform/mu/addInvoice",
    method: "post",
    data: params
  });
}
// 修改发货单
export function fetchUpdateInvoice(params) {
  return request({
    url: "/vform/mu/updateInvoice",
    method: "post",
    data: params
  });
}

// 删除发货单
export function fetchDelInvoice(params) {
  return request({
    url: "/vform/mu/delInvoice",
    method: "post",
    data: params
  });
}


// 批量新增发货单明细
export function fetchAddInvoiceItem(params) {
  return request({
    url: "/vform/mu/addBatchInvoiceItem",
    method: "post",
    data: params
  });
}

// 修改发货单明细
export function fetchUpdateInvoiceItem(params) {
  return request({
    url: "/vform/mu/updateInvoiceItem",
    method: "post",
    data: params
  });
}

// 查询发货单明细
export function fetchInvoiceList(params) {
  return request({
    url: "/vform/ev/comInterface/progCodeQuery?progCode=VSI2021",
    method: "post",
    data: params
  });
}

// 导出二维码
export function fetchExportQrCode(params, filename) {
  return download(
    "/vform/mu/exportQrCode",
    {
      ...params
    },
    filename
  );
}

// 校验记录列表查询
export function fetchVerififiRecord(params) {
  return request({
    url: "/vform/mu/queryVerifications",
    method: "post",
    data: params
  });
}
// 修改校验记录
export function fetchUpdateRecord(params) {
  return request({
    url: "/vform/mu/updateVerification",
    method: "post",
    data: params
  });
}

// 新增校验记录
export function fetchAddVerification(params) {
  return request({
    url: "/vform/mu/addVerification",
    method: "post",
    data: params
  });
}

// 新增批次
export function fetchAddBatch(params) {
  return request({
    url: "/vform/mu/addBatchInfo",
    method: "post",
    data: params
  });
}

// 查询批次号
export function fetchQueryBatchnum(params) {
  return request({
    url: "/vform/mu/queryBatchNum",
    method: "post",
    data: params
  });
}
